import {getCate} from "@/utils/api/homeapi"
export default{
    namespaced:true,
    state:{
        cate:[]
    },
    mutations: {
        //设置cate
        setCate(state,arr){
            state.cate=arr
        }
    },
    actions: {
        async asyncSetCate({commit}){
            let res=await getCate()
            console.log(res);
            commit('setCate',res.data.result)
        }
    },
}